import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('@/views/Index.vue'),
      children:[
        {
          path: '/home',
          name: 'home',
          component: () => import('@/views/Home.vue')
        },
        {
          path: '/jishi',
          name: 'jishi',
          component: () => import('@/views/Meinv.vue')
        },
        {
          path: '/order',
          name: 'order',
          component: () => import('@/views/Order.vue')
        },
        {
          path: '/mycenter',
          name: 'mycenter',
          component: () => import('@/views/Mycenter.vue')
        }
      ]
    },
    {
      path: '/service',
      name: 'service',
      component: () => import('@/views/Service/service.vue')
    }
    
  ]
})

export default router
